<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
       
    </style>
</head>
<body>
    <label for="">
        <input type="text" id="myForm" action="a">
    </label>
    <script>
        // 给定一个表单元素，其 id为 "myForm"，将其 action属性修改为 "new_action.php"。
        var a=document.getElementById('myForm');
        a.setAttribute('action','new_action.php');
        console.log(a);

    </script>
</body>
</html>